package com.practice.springboot_01_zwj.controller;

import com.github.pagehelper.PageInfo;
import com.practice.springboot_01_zwj.entity.CloudNetwork;
import com.practice.springboot_01_zwj.entity.FeatureCustomer;
import com.practice.springboot_01_zwj.service.CloudNetworkService;
import com.practice.springboot_01_zwj.service.FeatureCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/featureCustomer")
public class FeatureCustomerController {

    @Autowired
    private FeatureCustomerService featureCustomerService;


    @GetMapping("/selectByCustomerName")
    public PageInfo<FeatureCustomer> selectByCustomerName(
            @RequestParam(required = false) String customerName,
            @RequestParam(required = false) String customerBelonging,
            @RequestParam(defaultValue = "1") int page,
            @RequestParam(defaultValue = "20") int size
    ) {
        return featureCustomerService.selectByCustomerName(customerName,customerBelonging, page, size);
    }

}

